﻿using System;

namespace LsTool
{
    public static class DateTimeTo
    {
        public static string ToyyyyMMddHHmm(this DateTime date)
        { 
            return date.ToString("yyyy/MM/dd HH:mm");
        }

        public static string ToyyyyMMdd(this DateTime date)
        { 
            return date.ToString("yyyy/MM/dd");
        }
        public static string ToMMdd(this DateTime date)
        { 
            return date.ToString("MM/dd");
        }

        public static string ToHHmmss(this DateTime date)
        { 
            return date.ToString("HH:mm:ss");
        }

        public static string ToHHmm(this DateTime date)
        { 
            return date.ToString("HH:mm");
        }
        
        public static string ToyyyyMMddHHmmss(this DateTime date)
        {
            return date.ToString("yyyy/MM/dd HH:mm:ss"); ;
        }

    }
}